﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Security.Cryptography;
using System.Text;

namespace icsms.Helpers
{
    public class Security
    {
        public static string Hash(string contents)
        {
            SHA256Managed sha256 = new SHA256Managed();
            byte[] hashedBytes = sha256.ComputeHash(Encoding.Unicode.GetBytes(contents));
            string hashedContents = Convert.ToBase64String(hashedBytes);
            return hashedContents;
        }
    }
}